﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
//using Halk.Model;
namespace Halk.Config
{
    public class AppCache
    {
        private static AppCache _appCahce =null;

        public static AppCache Instace()
        {
            return _appCahce ?? (_appCahce = new AppCache());
        }

        private int _maxArticleID = 0;

        public int MaxArticleID
        {
            get
            {
                _maxArticleID++;
                return _maxArticleID;
            }
            set
            {
                _maxArticleID = value;
            }
        }

        private int _maxChapterID = 0;

        public int MaxChapterID
        {
            get
            {
                _maxChapterID++;
                return _maxChapterID;
            }
            set { _maxChapterID = value; }
        }

        private int _maxAttachID = 0;

        public int MaxAttachID
        {
            get
            {
                _maxAttachID++;
                return _maxAttachID;
            }
            set { _maxAttachID = value; }
        }

        public int GetDateTime()
        {
            return int.Parse(DateTime.Now.ToString("yyMMddHHmm"));
        }

        public bool GetOnOff()
        {
            return true;
        }

        //private Dictionary<string, SysWebInfo> _dicSysWebs;

        //public void LoadSysWebs()
        //{
        //    if (_dicSysWebs == null)
        //        _dicSysWebs = new Dictionary<string, SysWebInfo>();


        //}
    }
}
